package com.pentofab.payrollmanagement.database.impl;

public interface EmployeeTableSQLConstants extends SQLConstants {

	String getDepartment = new StringBuffer(select)
			.append(Table_Department.COMPANY_CODE).append(comma)
			.append(Table_Department.CODE).append(comma)
			.append(Table_Department.DESC).append(from)
			.append(Table_Department.TABLE_NAME).append(where)
			.append(Table_Department.COMPANY_CODE).append(equals)
			.append(question).append(and).append(Table_Department.CODE)
			.append(equals).append(question).toString();

	String getAllDepartments = new StringBuffer(select)
			.append(Table_Department.COMPANY_CODE).append(comma)
			.append(Table_Department.CODE).append(comma)
			.append(Table_Department.DESC).append(from)
			.append(Table_Department.TABLE_NAME).append(where)
			.append(Table_Department.COMPANY_CODE).append(equals)
			.append(question).toString();

	String addDepartment = new StringBuffer(insert_into)
			.append(Table_Department.TABLE_NAME).append(openingBrace)
			.append(Table_Department.COMPANY_CODE).append(comma)
			.append(Table_Department.CODE).append(comma)
			.append(Table_Department.DESC).append(closingBrace).append(values)
			.append(openingBrace).append("?,?,?").append(closingBrace)
			.toString();

	String updateDepartment = new StringBuffer(update)
			.append(Table_Department.TABLE_NAME).append(set)
			.append(Table_Department.DESC).append(equals).append(question)
			.append(where).append(Table_Department.COMPANY_CODE).append(equals)
			.append(question).append(and).append(Table_Department.CODE)
			.append(equals).append(question).toString();

	String deleteDepartment = new StringBuffer(delete).append(from)
			.append(Table_Department.TABLE_NAME).append(where)
			.append(Table_Department.COMPANY_CODE).append(equals)
			.append(question).append(and).append(Table_Department.CODE)
			.append(equals).append(question).toString();

	String getDesignation = new StringBuffer(select)
			.append(Table_Designation.COMPANY_CODE).append(comma)
			.append(Table_Designation.CODE).append(comma)
			.append(Table_Designation.DESC).append(from)
			.append(Table_Designation.TABLE_NAME).append(where)
			.append(Table_Designation.COMPANY_CODE).append(equals)
			.append(question).append(and).append(Table_Designation.CODE)
			.append(equals).append(question).toString();

	String getAllDesignations = new StringBuffer(select)
			.append(Table_Designation.COMPANY_CODE).append(comma)
			.append(Table_Designation.CODE).append(comma)
			.append(Table_Designation.DESC).append(from)
			.append(Table_Designation.TABLE_NAME).append(where)
			.append(Table_Designation.COMPANY_CODE).append(equals)
			.append(question).toString();

	String addDesignation = new StringBuffer(insert_into)
			.append(Table_Designation.TABLE_NAME).append(openingBrace)
			.append(Table_Designation.COMPANY_CODE).append(comma)
			.append(Table_Designation.CODE).append(comma)
			.append(Table_Designation.DESC).append(closingBrace).append(values)
			.append(openingBrace).append("?,?,?").append(closingBrace)
			.toString();

	String updateDesignation = new StringBuffer(update)
			.append(Table_Designation.TABLE_NAME).append(set)
			.append(Table_Designation.DESC).append(equals).append(question)
			.append(where).append(Table_Designation.COMPANY_CODE)
			.append(equals).append(question).append(and)
			.append(Table_Designation.CODE).append(equals).append(question)
			.toString();

	String deleteDesignation = new StringBuffer(delete).append(from)
			.append(Table_Designation.TABLE_NAME).append(where)
			.append(Table_Designation.COMPANY_CODE).append(equals)
			.append(question).append(and).append(Table_Designation.CODE)
			.append(equals).append(question).toString();

	String getCategory = new StringBuffer(select)
			.append(Table_Emp_Category.COMPANY_CODE).append(comma)
			.append(Table_Emp_Category.CODE).append(comma)
			.append(Table_Emp_Category.DESC).append(from)
			.append(Table_Emp_Category.TABLE_NAME).append(where)
			.append(Table_Emp_Category.COMPANY_CODE).append(equals)
			.append(question).append(and).append(Table_Emp_Category.CODE)
			.append(equals).append(question).toString();

	String getAllCategory = new StringBuffer(select)
			.append(Table_Emp_Category.COMPANY_CODE).append(comma)
			.append(Table_Emp_Category.CODE).append(comma)
			.append(Table_Emp_Category.DESC).append(from)
			.append(Table_Emp_Category.TABLE_NAME).append(where)
			.append(Table_Emp_Category.COMPANY_CODE).append(equals)
			.append(question).toString();

	String addCategory = new StringBuffer(insert_into)
			.append(Table_Emp_Category.TABLE_NAME).append(openingBrace)
			.append(Table_Emp_Category.COMPANY_CODE).append(comma)
			.append(Table_Emp_Category.CODE).append(comma)
			.append(Table_Emp_Category.DESC).append(closingBrace)
			.append(values).append(openingBrace).append("?,?,?")
			.append(closingBrace).toString();

	String updateCategory = new StringBuffer(update)
			.append(Table_Emp_Category.TABLE_NAME).append(set)
			.append(Table_Emp_Category.DESC).append(equals).append(question)
			.append(where).append(Table_Emp_Category.COMPANY_CODE)
			.append(equals).append(question).append(and)
			.append(Table_Emp_Category.CODE).append(equals).append(question)
			.toString();

	String deleteCategory = new StringBuffer(delete).append(from)
			.append(Table_Emp_Category.TABLE_NAME).append(where)
			.append(Table_Emp_Category.COMPANY_CODE).append(equals)
			.append(question).append(and).append(Table_Emp_Category.CODE)
			.append(equals).append(question).toString();

	
	String getAllEmpByNameQuery = new StringBuffer(select)
			.append(Table_Employee.empName).append(comma)
			.append(Table_Employee.empId).append(comma)
			.append(Table_Employee.DOB).append(comma)
			.append(Table_Employee.telophone1).append(comma)
			.append(Table_Employee.telophone2).append(comma)
			.append(Table_Employee.address1).append(comma)
			.append(Table_Employee.address2).append(comma)
			.append(Table_Employee.city).append(comma)
			.append(Table_Employee.state).append(comma)
			.append(Table_Employee.country).append(comma)
			.append(Table_Employee.zipCode).append(comma)
			.append(Table_Employee.CompanyCode).append(comma)
			.append(Table_Employee.sex).append(comma)
			.append(Table_Employee.DOJ).append(comma)
			.append(Table_Employee.unitCode).append(comma)
			.append(Table_Employee.designationCode).append(comma)
			.append(Table_Employee.deptCode).append(comma)
			.append(Table_Employee.Category).append(comma)
			.append(Table_Employee.rools).append(comma)
			.append(Table_Employee.hoursperday).append(comma)
			.append(Table_Employee.weeklyoff).append(comma)
			.append(Table_Employee.createdby).append(comma)
			.append(Table_Employee.modificaitonDate).append(comma)
			.append(Table_Employee.modifiedBy).append(comma)
			.append(Table_Employee.deletionDate).append(comma)
			.append(Table_Employee.deletedBy).append(comma)
			.append(Table_Employee.unitCode).append(from)
			.append(Table_Employee.tableName).append(where).append(LOWER)
			.append(openingBrace).append(Table_Employee.empName)
			.append(closingBrace).append(like).toString();

	String getAllEmpByCompany = new StringBuffer(select)
			.append(Table_Employee.empName).append(comma)
			.append(Table_Employee.empId).append(comma)
			.append(Table_Employee.DOB).append(comma)
			.append(Table_Employee.telophone1).append(comma)
			.append(Table_Employee.telophone2).append(comma)
			.append(Table_Employee.address1).append(comma)
			.append(Table_Employee.address2).append(comma)
			.append(Table_Employee.city).append(comma)
			.append(Table_Employee.state).append(comma)
			.append(Table_Employee.country).append(comma)
			.append(Table_Employee.zipCode).append(comma)
			.append(Table_Employee.CompanyCode).append(comma)
			.append(Table_Employee.sex).append(comma)
			.append(Table_Employee.DOJ).append(comma)
			.append(Table_Employee.designationCode).append(comma)
			.append(Table_Employee.deptCode).append(comma)
			.append(Table_Employee.Category).append(comma)
			.append(Table_Employee.rools).append(comma)
			.append(Table_Employee.hoursperday).append(comma)
			.append(Table_Employee.weeklyoff).append(comma)
			.append(Table_Employee.createdby).append(comma)
			.append(Table_Employee.modificaitonDate).append(comma)
			.append(Table_Employee.unitCode).append(comma)
			.append(Table_Employee.modifiedBy).append(comma)
			.append(Table_Employee.deletionDate).append(comma)
			.append(Table_Employee.deletedBy).append(comma)
			.append(Table_Employee.unitCode).append(from)
			.append(Table_Employee.tableName).append(where)
			.append(Table_Employee.CompanyCode).append(equals).append(question)
			.append(ORDEY_BY)
			.append(Table_Employee.deletedBy).append(" asc ").append(comma)
			.append(Table_Employee.empId).append(" asc").toString();

	String exactMatchEmpByNameQuery = new StringBuffer(select)
			.append(Table_Employee.empName).append(comma)
			.append(Table_Employee.empId).append(comma)
			.append(Table_Employee.DOB).append(comma)
			.append(Table_Employee.telophone1).append(comma)
			.append(Table_Employee.telophone2).append(comma)
			.append(Table_Employee.address1).append(comma)
			.append(Table_Employee.address2).append(comma)
			.append(Table_Employee.city).append(comma)
			.append(Table_Employee.state).append(comma)
			.append(Table_Employee.country).append(comma)
			.append(Table_Employee.zipCode).append(comma)
			.append(Table_Employee.CompanyCode).append(comma)
			.append(Table_Employee.unitCode).append(comma)
			.append(Table_Employee.sex).append(comma)
			.append(Table_Employee.DOJ).append(comma)
			.append(Table_Employee.designationCode).append(comma)
			.append(Table_Employee.deptCode).append(comma)
			.append(Table_Employee.Category).append(comma)
			.append(Table_Employee.rools).append(comma)
			.append(Table_Employee.hoursperday).append(comma)
			.append(Table_Employee.weeklyoff).append(comma)
			.append(Table_Employee.createdby).append(comma)
			.append(Table_Employee.modificaitonDate).append(comma)
			.append(Table_Employee.modifiedBy).append(comma)
			.append(Table_Employee.deletionDate).append(comma)
			.append(Table_Employee.deletedBy).append(comma)
			.append(Table_Employee.unitCode).append(from)
			.append(Table_Employee.tableName).append(where).append(LOWER)
			.append(openingBrace).append(Table_Employee.empName)
			.append(closingBrace).append(equals).append(question).toString();

	String empByIDQery = new StringBuffer(select)
			.append(Table_Employee.empName).append(comma)
			.append(Table_Employee.empId).append(comma)
			.append(Table_Employee.DOB).append(comma)
			.append(Table_Employee.telophone1).append(comma)
			.append(Table_Employee.telophone2).append(comma)
			.append(Table_Employee.address1).append(comma)
			.append(Table_Employee.address2).append(comma)
			.append(Table_Employee.city).append(comma)
			.append(Table_Employee.state).append(comma)
			.append(Table_Employee.country).append(comma)
			.append(Table_Employee.zipCode).append(comma)
			.append(Table_Employee.CompanyCode).append(comma)
			.append(Table_Employee.sex).append(comma)
			.append(Table_Employee.DOJ).append(comma)
			.append(Table_Employee.designationCode).append(comma)
			.append(Table_Employee.deptCode).append(comma)
			.append(Table_Employee.Category).append(comma)
			.append(Table_Employee.rools).append(comma)
			.append(Table_Employee.hoursperday).append(comma)
			.append(Table_Employee.weeklyoff).append(comma)
			.append(Table_Employee.createdby).append(comma)
			.append(Table_Employee.modificaitonDate).append(comma)
			.append(Table_Employee.modifiedBy).append(comma)
			.append(Table_Employee.deletionDate).append(comma)
			.append(Table_Employee.deletedBy).append(comma)
			.append(Table_Employee.unitCode).append(from)
			.append(Table_Employee.tableName).append(where)
			.append(Table_Employee.empId).append(equals).append(question)
			.toString();

	String allEmployees = new StringBuffer(select)
			.append(Table_Employee.empName).append(comma)
			.append(Table_Employee.empId).append(comma)
			.append(Table_Employee.telophone1).append(comma)
			.append(Table_Employee.telophone2).append(comma)
			.append(Table_Employee.address1).append(comma)
			.append(Table_Employee.address2).append(comma)
			.append(Table_Employee.city).append(comma)
			.append(Table_Employee.state).append(comma)
			.append(Table_Employee.country).append(comma)
			.append(Table_Employee.zipCode).append(comma)
			.append(Table_Employee.CompanyCode).append(comma)
			.append(Table_Employee.sex).append(comma)
			.append(Table_Employee.DOJ).append(comma)
			.append(Table_Employee.designationCode).append(comma)
			.append(Table_Employee.deptCode).append(comma)
			.append(Table_Employee.Category).append(comma)
			.append(Table_Employee.rools).append(comma)
			.append(Table_Employee.hoursperday).append(comma)
			.append(Table_Employee.weeklyoff).append(comma)
			.append(Table_Employee.createdby).append(comma)
			.append(Table_Employee.modificaitonDate).append(comma)
			.append(Table_Employee.modifiedBy).append(comma)
			.append(Table_Employee.deletionDate).append(comma)
			.append(Table_Employee.deletedBy).append(comma)
			.append(Table_Employee.unitCode).append(from)
			.append(Table_Employee.tableName).append(ORDEY_BY)
			.append(Table_Employee.deletedBy).append(" asc ").append(comma)
			.append(Table_Employee.empId).append(" asc").toString();

	String setNextEmpNo ="UPDATE payroll.nextemployeeid SET EmployeeSequence = EmployeeSequence+1 WHERE CompanyCode = ?";
	
	
	// <Add Employee>
	String createEmployee = new StringBuffer(insert_into)
			.append(Table_Employee.tableName).append(openingBrace)
			.append(Table_Employee.empId).append(comma)
			.append(Table_Employee.empName).append(comma)
			.append(Table_Employee.DOB).append(comma)
			.append(Table_Employee.telophone1).append(comma)
			.append(Table_Employee.telophone2).append(comma)
			.append(Table_Employee.address1).append(comma)
			.append(Table_Employee.address2).append(comma)
			.append(Table_Employee.city).append(comma)
			.append(Table_Employee.state).append(comma)
			.append(Table_Employee.country).append(comma)
			.append(Table_Employee.zipCode).append(comma)
			.append(Table_Employee.CompanyCode).append(comma)
			.append(Table_Employee.sex).append(comma)
			.append(Table_Employee.DOJ).append(comma)
			.append(Table_Employee.designationCode).append(comma)
			.append(Table_Employee.deptCode).append(comma)
			.append(Table_Employee.Category).append(comma)
			.append(Table_Employee.rools).append(comma)
			.append(Table_Employee.hoursperday).append(comma)
			.append(Table_Employee.weeklyoff).append(comma)
			.append(Table_Employee.createdby).append(comma)
			.append(Table_Employee.unitCode).append(closingBrace)
			.append(values).append(openingBrace)
			.append("?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?").append(closingBrace)
			.toString();

	// <Add Employee>
	String updateEmployee = new StringBuffer(update)
			.append(Table_Employee.tableName).append(set)
			.append(Table_Employee.empName).append(equals).append(question).append(comma)
			.append(Table_Employee.DOB).append(equals).append(question).append(comma)
			.append(Table_Employee.telophone1).append(equals).append(question).append(comma)
			.append(Table_Employee.telophone2).append(equals).append(question).append(comma)
			.append(Table_Employee.address1).append(equals).append(question).append(comma)
			.append(Table_Employee.address2).append(equals).append(question).append(comma)
			.append(Table_Employee.city).append(equals).append(question).append(comma)
			.append(Table_Employee.state).append(equals).append(question).append(comma)
			.append(Table_Employee.country).append(equals).append(question).append(comma)
			.append(Table_Employee.zipCode).append(equals).append(question).append(comma)
			.append(Table_Employee.CompanyCode).append(equals).append(question).append(comma)
			.append(Table_Employee.sex).append(equals).append(question).append(comma)
			.append(Table_Employee.DOJ).append(equals).append(question).append(comma)
			.append(Table_Employee.designationCode).append(equals).append(question).append(comma)
			.append(Table_Employee.deptCode).append(equals).append(question).append(comma)
			.append(Table_Employee.Category).append(equals).append(question).append(comma)
			.append(Table_Employee.rools).append(equals).append(question).append(comma)
			.append(Table_Employee.hoursperday).append(equals).append(question).append(comma)
			.append(Table_Employee.weeklyoff).append(equals).append(question).append(comma)
			.append(Table_Employee.modificaitonDate).append(equals).append(sqlCurDate).append(comma)
			.append(Table_Employee.modifiedBy).append(equals).append(question).append(comma)
			.append(Table_Employee.deletedBy).append(equals).append("' '").append(comma)
			.append(Table_Employee.deletionDate).append(equals).append("' '").append(comma)
			.append(Table_Employee.unitCode).append(equals).append(question)
			.append(where).append(Table_Employee.empId).append(equals).append(question)
			.toString();
	
	String deleteEmployee = new StringBuffer(update)
			.append(Table_Employee.tableName).append(set)
			.append(Table_Employee.deletionDate).append(equals).append(sqlCurDate)
			.append(comma).append(Table_Employee.deletedBy).append(equals)
			.append(question).append(where).append(Table_Employee.empId)
			.append(equals).append(question).toString();

	String createCompany = new StringBuffer(insert_into)
			.append(Table_Company.tableName).append(openingBrace)
			.append(Table_Company.companyCode).append(comma)
			.append(Table_Company.name).append(comma)
			.append(Table_Company.address1).append(comma)
			.append(Table_Company.address2).append(comma)
			.append(Table_Company.city).append(comma)
			.append(Table_Company.state).append(comma)
			.append(Table_Company.country).append(comma)
			.append(Table_Company.zipcode).append(comma)
			.append(Table_Company.telophone1).append(comma)
			.append(Table_Company.telephone2).append(comma)
			.append(Table_Company.fax).append(comma)
			.append(Table_Company.emalId).append(closingBrace).append(values)
			.append(openingBrace).append("?,?,?,?,?,?,?,?,?,?,?,?")
			.append(closingBrace).toString();
	
	

	String updateCompany = new StringBuffer(update)
			.append(Table_Company.tableName).append(set)
			.append(Table_Company.name).append(equals).append(question)
			.append(comma).append(Table_Company.address1).append(equals)
			.append(question).append(comma).append(Table_Company.address2)
			.append(equals).append(question).append(comma)
			.append(Table_Company.city).append(equals).append(question)
			.append(comma).append(Table_Company.state).append(equals)
			.append(question).append(comma).append(Table_Company.country)
			.append(equals).append(question).append(comma)
			.append(Table_Company.zipcode).append(equals).append(question)
			.append(comma).append(Table_Company.telophone1).append(equals)
			.append(question).append(comma).append(Table_Company.telephone2)
			.append(equals).append(question).append(comma)
			.append(Table_Company.fax).append(equals).append(question)
			.append(comma).append(Table_Company.emalId).append(equals)
			.append(question).append(where).append(Table_Company.companyCode)
			.append(equals).append(question).toString();
	
	

	String getAllCompanies = new StringBuffer(select)
			.append(Table_Company.name).append(comma)
			.append(Table_Company.companyCode).append(comma)
			.append(Table_Company.address1).append(comma)
			.append(Table_Company.address2).append(comma)
			.append(Table_Company.city).append(comma)
			.append(Table_Company.state).append(comma)
			.append(Table_Company.country).append(comma)
			.append(Table_Company.zipcode).append(comma)
			.append(Table_Company.telophone1).append(comma)
			.append(Table_Company.telephone2).append(comma)
			.append(Table_Company.fax).append(comma)
			.append(Table_Company.emalId).append(from)
			.append(Table_Company.tableName).append(ORDEY_BY)
			.append(Table_Company.name).toString();
	

	String getCompanyById = new StringBuffer(select).append(Table_Company.name)
			.append(comma).append(Table_Company.companyCode).append(comma)
			.append(Table_Company.address1).append(comma)
			.append(Table_Company.address2).append(comma)
			.append(Table_Company.city).append(comma)
			.append(Table_Company.state).append(comma)
			.append(Table_Company.country).append(comma)
			.append(Table_Company.zipcode).append(comma)
			.append(Table_Company.telophone1).append(comma)
			.append(Table_Company.telephone2).append(comma)
			.append(Table_Company.fax).append(comma)
			.append(Table_Company.emalId).append(from)
			.append(Table_Company.tableName).append(where)
			.append(Table_Company.companyCode).append(equals).append(question)
			.toString();

	interface Table_Employee {

		String tableName = "Employee";
		String empName = tableName + ".Name";
		String empId = tableName + ".EmployeeId";
		String DOB = tableName + ".DOB";
		String telophone1 = tableName + ".Telophone1";
		String telophone2 = tableName + ".Telophone2";
		String address1 = tableName + ".Address1";
		String address2 = tableName + ".Address2";
		String city = tableName + ".City";
		String state = tableName + ".AddressState";
		String country = tableName + ".Country";
		String zipCode = tableName + ".ZipCode";
		String CompanyCode = tableName + ".CompanyCode";
		String sex = tableName + ".sex";
		String DOJ = tableName + ".DOJ";
		String designationCode = tableName + ".DesignationCode";
		String deptCode = tableName + ".DeptCode";
		String Category = tableName + ".Category";
		String rools = tableName + ".rools";
		String hoursperday = tableName + ".hoursperday";
		String weeklyoff = tableName+".weeklyoff";
		String createdby = tableName+".createdby";
		String modificaitonDate = tableName+".modificaitonDate";
		String modifiedBy = tableName+".modifiedBy";
		String deletionDate = tableName+".deletionDate";
		String deletedBy = tableName+".deletedBy";
		String unitCode = tableName+".unitCode";
	}

	interface Table_Designation {

		String TABLE_NAME = "designation";
		String COMPANY_CODE = TABLE_NAME + ".CompanyCode";
		String CODE = TABLE_NAME + ".Code";
		String DESC = TABLE_NAME + ".Description";
	}

	interface Table_Department {

		String TABLE_NAME = "department";
		String COMPANY_CODE = TABLE_NAME + ".CompanyCode";
		String CODE = TABLE_NAME + ".Code";
		String DESC = TABLE_NAME + ".Description";
	}

	interface Table_Emp_Category {

		String TABLE_NAME = "empcategory";
		String COMPANY_CODE = TABLE_NAME + ".CompanyCode";
		String CODE = TABLE_NAME + ".Code";
		String DESC = TABLE_NAME + ".Description";

	}

	interface Table_Company {

		String tableName = "company";
		String name = tableName + ".Name";
		String companyCode = tableName + ".CompanyCode";
		String address1 = tableName + ".Address1";
		String address2 = tableName + ".Address2";
		String city = tableName + ".City";
		String state = tableName + ".AddressState";
		String country = tableName + ".Country";
		String zipcode = tableName + ".Zipcode";
		String telophone1 = tableName + ".Telephone1";
		String telephone2 = tableName + ".Telephone2";
		String fax = tableName + ".fax";
		String emalId = tableName + ".EmailId";
		String parent = tableName + ".parent";
	}
	
	//Unit Block start
		String createUnit = new StringBuffer(insert_into)
				.append(Table_Unit.tableName).append(openingBrace)
				.append(Table_Unit.companyCode).append(comma)
				.append(Table_Unit.unitCode).append(comma)
				.append(Table_Unit.name).append(comma)
				.append(Table_Unit.address1).append(comma)
				.append(Table_Unit.address2).append(comma)
				.append(Table_Unit.city).append(comma)
				.append(Table_Unit.state).append(comma)
				.append(Table_Unit.country).append(comma)
				.append(Table_Unit.zipcode).append(comma)
				.append(Table_Unit.telophone1).append(comma)
				.append(Table_Unit.telephone2).append(comma)
				.append(Table_Unit.fax).append(comma)
				.append(Table_Unit.emalId).append(closingBrace).append(values)
				.append(openingBrace).append("?,?,?,?,?,?,?,?,?,?,?,?,?")
				.append(closingBrace).toString();
		
		String updateUnit = new StringBuffer(update)
				.append(Table_Unit.tableName).append(set)
				.append(Table_Unit.name).append(equals).append(question)
				.append(comma).append(Table_Unit.address1).append(equals)
				.append(question).append(comma).append(Table_Unit.address2)
				.append(equals).append(question).append(comma)
				.append(Table_Unit.city).append(equals).append(question)
				.append(comma).append(Table_Unit.state).append(equals)
				.append(question).append(comma).append(Table_Unit.country)
				.append(equals).append(question).append(comma)
				.append(Table_Unit.zipcode).append(equals).append(question)
				.append(comma).append(Table_Unit.telophone1).append(equals)
				.append(question).append(comma).append(Table_Unit.telephone2)
				.append(equals).append(question).append(comma)
				.append(Table_Unit.fax).append(equals).append(question)
				.append(comma).append(Table_Unit.emalId).append(equals)
				.append(question).append(where).append(Table_Unit.unitCode)
				.append(equals).append(question).append(and).append(Table_Unit.companyCode)
				.append(equals).append(question).toString();
		
		String getAllUnits = new StringBuffer(select)
				.append(Table_Unit.name).append(comma)
				.append(Table_Unit.unitCode).append(comma)
				.append(Table_Unit.address1).append(comma)
				.append(Table_Unit.address2).append(comma)
				.append(Table_Unit.city).append(comma)
				.append(Table_Unit.state).append(comma)
				.append(Table_Unit.country).append(comma)
				.append(Table_Unit.zipcode).append(comma)
				.append(Table_Unit.telophone1).append(comma)
				.append(Table_Unit.telephone2).append(comma)
				.append(Table_Unit.companyCode).append(comma)
				.append(Table_Unit.fax).append(comma)
				.append(Table_Unit.emalId).append(from)
				.append(Table_Unit.tableName).append(where).append(Table_Unit.companyCode)
				.append(equals).append(question).append(ORDEY_BY)
				.append(Table_Unit.name).toString();
		
		String getUnitById = new StringBuffer(select).append(Table_Unit.name)
				.append(comma).append(Table_Unit.unitCode).append(comma)
				.append(Table_Unit.address1).append(comma)
				.append(Table_Unit.companyCode).append(comma)
				.append(Table_Unit.address2).append(comma)
				.append(Table_Unit.city).append(comma)
				.append(Table_Unit.state).append(comma)
				.append(Table_Unit.country).append(comma)
				.append(Table_Unit.zipcode).append(comma)
				.append(Table_Unit.telophone1).append(comma)
				.append(Table_Unit.telephone2).append(comma)
				.append(Table_Unit.fax).append(comma)
				.append(Table_Unit.emalId).append(from)
				.append(Table_Unit.tableName).append(where)
				.append(Table_Unit.unitCode).append(equals).append(question)
				.append(and).append(Table_Unit.companyCode)
				.append(equals).append(question)
				.toString();
		
		String setEmployeeSequence = new StringBuffer(insert_into)
				.append(Table_NextEmployeeID.tableName).append(openingBrace)
				.append(Table_NextEmployeeID.companyCode).append(comma)
				.append(Table_NextEmployeeID.employeeSequence)
				.append(closingBrace).append(values)
				.append(openingBrace).append("?,'1000'")
				.append(closingBrace).toString();
		
		String nextEmpId = new StringBuffer().append(select)
				.append(Table_NextEmployeeID.employeeSequence)
				.append(from).append(Table_NextEmployeeID.tableName)
				.append(where).append(Table_NextEmployeeID.companyCode)
				.append(equals).append(question).toString();
		
		String NEXT_EMP_ID = "NEXT_EMP_ID";
		
		String NextEmpSequence = Table_NextEmployeeID.tableName +".EmployeeSequence";
		
	interface Table_NextEmployeeID {
		String tableName = "NextEmployeeId";
		String companyCode = tableName + ".CompanyCode";
		String employeeSequence = tableName + ".EmployeeSequence";
	}
	
	
	interface Table_Unit {

		String tableName = "Unit";
		String companyCode = tableName + ".companyCode";
		String name = tableName + ".Name";
		String unitCode = tableName + ".UnitCode";
		String address1 = tableName + ".Address1";
		String address2 = tableName + ".Address2";
		String city = tableName + ".City";
		String state = tableName + ".AddressState";
		String country = tableName + ".Country";
		String zipcode = tableName + ".Zipcode";
		String telophone1 = tableName + ".Telephone1";
		String telephone2 = tableName + ".Telephone2";
		String fax = tableName + ".fax";
		String emalId = tableName + ".EmailId";
	}
	//Unit block end
	
	//BankInfo block start
	String createBankInfo = new StringBuffer(insert_into)
	.append(Table_BankInfo.tableName).append(openingBrace)
	.append(Table_BankInfo.bankCode).append(comma)
	.append(Table_BankInfo.name).append(comma)
	.append(Table_BankInfo.address).append(comma)
	.append(Table_BankInfo.city).append(comma)
	.append(Table_BankInfo.state).append(comma)
	.append(Table_BankInfo.country).append(comma)
	.append(Table_BankInfo.zipcode).append(comma)
	.append(Table_BankInfo.telophone1).append(comma)
	.append(Table_BankInfo.telephone2).append(comma)
	.append(Table_BankInfo.fax).append(comma)
	.append(Table_BankInfo.emalId).append(comma)
	.append(Table_BankInfo.ISFCCode).append(closingBrace).append(values)
	.append(openingBrace).append("?,?,?,?,?,?,?,?,?,?,?,?")
	.append(closingBrace).toString();
	
	String updateBankInfo = new StringBuffer(update)
	.append(Table_BankInfo.tableName).append(set)
	.append(Table_BankInfo.name).append(equals).append(question)
	.append(comma).append(Table_BankInfo.address).append(equals).append(question)
	.append(comma).append(Table_BankInfo.city).append(equals).append(question)
	.append(comma).append(Table_BankInfo.state).append(equals).append(question)
	.append(comma).append(Table_BankInfo.country).append(equals).append(question)
	.append(comma).append(Table_BankInfo.zipcode).append(equals).append(question)
	.append(comma).append(Table_BankInfo.telophone1).append(equals).append(question)
	.append(comma).append(Table_BankInfo.telephone2).append(equals).append(question)
	.append(comma).append(Table_BankInfo.fax).append(equals).append(question)
	.append(comma).append(Table_BankInfo.emalId).append(equals).append(question)
	.append(comma).append(Table_BankInfo.ISFCCode).append(equals).append(question)
	.append(where).append(Table_BankInfo.bankCode)
	.append(equals).append(question).toString();
	
	String getAllBanksInfo = new StringBuffer(select)
	.append(Table_BankInfo.name).append(comma)
	.append(Table_BankInfo.bankCode).append(comma)
	.append(Table_BankInfo.address).append(comma)
	.append(Table_BankInfo.city).append(comma)
	.append(Table_BankInfo.state).append(comma)
	.append(Table_BankInfo.country).append(comma)
	.append(Table_BankInfo.zipcode).append(comma)
	.append(Table_BankInfo.telophone1).append(comma)
	.append(Table_BankInfo.telephone2).append(comma)
	.append(Table_BankInfo.fax).append(comma)
	.append(Table_BankInfo.emalId).append(comma)
	.append(Table_BankInfo.ISFCCode).append(from)
	.append(Table_BankInfo.tableName).append(ORDEY_BY)
	.append(Table_BankInfo.name).toString();
	
	String getBankInfoById = new StringBuffer(select).append(Table_BankInfo.name)
			.append(comma).append(Table_BankInfo.bankCode).append(comma)
			.append(Table_BankInfo.address).append(comma)
			.append(Table_BankInfo.city).append(comma)
			.append(Table_BankInfo.state).append(comma)
			.append(Table_BankInfo.country).append(comma)
			.append(Table_BankInfo.zipcode).append(comma)
			.append(Table_BankInfo.telophone1).append(comma)
			.append(Table_BankInfo.telephone2).append(comma)
			.append(Table_BankInfo.fax).append(comma)
			.append(Table_BankInfo.emalId).append(comma)
			.append(Table_BankInfo.ISFCCode).append(from)
			.append(Table_BankInfo.tableName).append(where)
			.append(Table_BankInfo.bankCode).append(equals).append(question)
			.toString();
	
	interface Table_BankInfo {

		String tableName = "BankInfo";
		String bankCode = tableName + ".BankCode";
		String name = tableName + ".Name";
		String address = tableName + ".Address";
		String city = tableName + ".City";
		String state = tableName + ".State";
		String country = tableName + ".Country";
		String zipcode = tableName + ".Zipcode";
		String telophone1 = tableName + ".Telephone1";
		String telephone2 = tableName + ".Telephone2";
		String fax = tableName + ".fax";
		String emalId = tableName + ".EmailId";
		String ISFCCode = tableName + ".ISFCCode";
	}
	//BankInfo block end
	
	// </Add Employee>
	String tableNameQuery = new StringBuffer(select).append("TABLE_NAME").append(from)
			.append("information_schema.TABLES").append(where).append("TABLE_SCHEMA")
			.append(equals).append(singlequote).append("payroll").append(singlequote).toString();
			
			//SELECT column_name FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'payroll' AND table_name = 'attendance';

			String getColumsQuery = new StringBuffer(select).append("Column_Name")
			.append(from).append("Information_Schema.COLUMNS").append(where).append("TABLE_SCHEMA").append(equals).append("'payroll'")
			.append(and).append("TABLE_NAME").append(equals).append(question).toString();
	// <

			String readDepartment = new StringBuffer(select).append("*")
					.append(from).append(Table_Department.TABLE_NAME).toString();
}
